Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for boolean option in :ignore config #53

Closed
wants to merge 3 commits into from
Closed

add support for boolean option in :ignore config #53

wants to merge 3 commits into from

Conversation

ktravers
Copy link

@ktravers ktravers commented Jan 31, 2019

closes #48

Summary

Currently, to ignore all errors in a specific environment (such as :test or :dev), you set :ignore config to a function that returns true:

config :airbrakex,
  ignore: fn(_error) ->
    true
  end

This PR adds support for passing a boolean value instead of a function, as a more convenient/concise option.

config :airbrakex, ignore: true

Changes

  • adds boolean ignore option
  • updates documentation
  • adds test for boolean ignore option

/cc @fazibear

@ktravers
Copy link
Author

👋 @fazibear touching base on this PR. If you don't want to introduce this functionality, please let me know, and I'll be happy to close it and its associated issue. Or please feel free to close yourself if that's easier 🙂

@fazibear
Copy link
Owner

fazibear commented Oct 1, 2020

I'm just curious, if you want to ignore ALL errors why just disable (compile out) airbrakex ?

@ktravers
Copy link
Author

ktravers commented Feb 3, 2021

I'm just curious, if you want to ignore ALL errors why just disable (compile out) airbrakex ?

@fazibear In our use case, we're including airbrakex in our default config/config.exs file, then overriding it in our config/dev.exs and config/test.exs files to ignore all errors. I'm not sure how to disable/compile out airbrakex without changing our config file setup altogether (to not rely on overrides).

The proposed change seemed like the most straightforward way to achieve this. But if there's an easier way I'm unaware of, that'd be even better! Apologies if I'm missing something obvious; I've been away from this project for a bit, so my Elixir skills are a bit rusty 🙇‍♀️

@ktravers
Copy link
Author

ktravers commented Feb 1, 2022

This PR has been pretty long-lived, so I'm going to go ahead and close. Happy to re-open if necessary, but seems like there isn't too much demand for this change outside me & my old team 😅

@ktravers ktravers closed this Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

support for boolean values in :ignore config key
2 participants